#include "sort.hpp"
#include <iostream>

void InsertSortTest()
{
   std::vector<int> nums { 1, 3, 5, 2, 4, 6, -2, -1 };
   InsertSort(nums);
   for (const auto e : nums) {
      std::cout << e << std::endl;
   }
}

void ShellSortTest()
{
   std::vector<int> nums { 1, 3, 5, 2, 4, 6, -2, -1 };
   ShellSort(nums);
   for (const auto e : nums) {
      std::cout << e << std::endl;
   }
}

void SelectSortTest()
{
   std::vector<int> nums { 1, 3, 5, 2, 4, 6, -2, -1 };
   SelectSort(nums);
   for (const auto e : nums) {
      std::cout << e << std::endl;
   }
}

void HeapSortTest()
{
   std::vector<int> nums { 1, 3, 5, 2, 4, 6, -2, -1 };
   HeapSort(nums);
   for (const auto e : nums) {
      std::cout << e << std::endl;
   }
}

void BubbleSortTest()
{
   std::vector<int> nums { 1, 3, 5, 2, 4, 6, -2, -1 };
   BubbleSort(nums);
   for (const auto e : nums) {
      std::cout << e << std::endl;
   }
}

void QuickSortTest()
{
   std::vector<int> nums { 1, 3, 5, 2, 4, 6, -2, -1 };
   // std::vector<int> nums { 3, 5, 2, 4, 6 };
   QuickSort(nums.begin(), nums.end());
   for (const auto e : nums) {
      std::cout << e << std::endl;
   }
}

void MergeSortTest()
{
   std::vector<int> nums { 1, 3, 5, 2, 4, 6, -2, -1 };
   // std::vector<int> nums { 3, 5, 2, 4, 6 };
   MergeSort(nums);
   for (const auto e : nums) {
      std::cout << e << std::endl;
   }
}

void CountSortTest()
{
   std::vector<int> nums { 1, 3, 5, 2, 4, 6, -2, -1 };
   // std::vector<int> nums { 3, 5, 2, 4, 6 };
   CountSort(nums);
   for (const auto e : nums) {
      std::cout << e << std::endl;
   }
}

int main()
{
   // InsertSortTest();
   // ShellSortTest();
   // SelectSortTest();
   // HeapSortTest();
   // BubbleSortTest();
   // QuickSortTest();
   // MergeSortTest();
   CountSortTest();
   return 0;
}
